package com.yyaccp.appinfo.controller;

import com.yyaccp.appinfo.util.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RestController
@RequestMapping("/api/login")
public class LoginController {


    @GetMapping("/logout")
    public AjaxResult logout(HttpSession session){
        session.invalidate();
        return AjaxResult.success("注销成功");
    }
}
